import axios from '@/libs/api.request'

// 薪资付款申请
export class FinanceSPayableApi {
  // 薪资付款申请
  static getSApply (params) {
    return axios.request({
      url: '/FinanceSalary/GetSApply',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 导出薪资付款申请
  static exportApply (params) {
    return axios.request({
      url: '/FinanceSalary/ExportApply',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 导出薪资付款申请明细
  static exportAllDetails (params) {
    return axios.request({
      url: '/FinanceSalary/ExportAllDetails',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 获取申请发放的人员
  static getApplyUsers (params) {
    return axios.request({
      url: '/FinanceSalary/GetApplyUsers',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 提交申请发放
  static postApplyUsers (params) {
    return axios.request({
      url: '/FinanceSalary/PostApplyUsers',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 获取薪资付款申请明细数据|获取薪资应付账单明细
  static getDetails (params) {
    return axios.request({
      url: '/FinanceSalary/GetDetails',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 导出明细
  static exportApplyDetail (params) {
    return axios.request({
      url: '/FinanceSalary/ExportApplyDetail',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 薪资应付账单
  static getSList (params) {
    return axios.request({
      url: '/FinanceSalary/GetSList',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 导出薪资应付账单
  static export (params) {
    return axios.request({
      url: '/FinanceSalary/Export',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 导出明细
  static exportAllDetails (params) {
    return axios.request({
      url: '/FinanceSalary/ExportAllDetails',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 个税付款确认
  static postIncome (params) {
    return axios.request({
      url: '/FinanceSalary/PostIncome',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 退回 列表退回只传SalaryID 明细退回传SalaryID和EmployeeIDs
  static back (params) {
    return axios.request({
      url: '/FinanceSalary/Back',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 导入发放结果
  static importResult (params) {
    return axios.request({
      url: '/FinanceSalary/ImportResult',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 保存模板
  static postTemplate (params) {
    return axios.request({
      url: '/FinanceSalary/PostTemplate',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 导出发放数据
  static exportGrantData (params) {
    return axios.request({
      url: '/FinanceSalary/ExportGrantData',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }

  // 已发放
  static paied (params) {
    return axios.request({
      url: '/FinanceSalary/Paied',
      method: 'post',
      enctype: 'multipart/form-data',
      data: params
    })
  }
}
